﻿
using System;
using System.Web.Routing;
using System.Web.Mvc;
using System.Web;

static public class Routes 
{
	public static void RegisterRoutes(RouteCollection routesTable)
	{
				
		routesTable.MapRoute(
					"UpdatesUnapproved",
					"Updates/Unapproved",
					new { controller = "Updates", action = "Unapproved" }
				);
				
		
		routesTable.MapRoute(
					"UpdatesUnapprovedGrid",
					"Updates/UnapprovedGrid",
					new { controller = "Updates", action = "UnapprovedGrid" }
				);
				
		
		routesTable.MapRoute(
					"UpdatesDeclined",
					"Updates/Declined",
					new { controller = "Updates", action = "Declined" }
				);
				
		
		routesTable.MapRoute(
					"UpdateDetails",
					"Update/{id}/Details",
					new { controller = "Updates", action = "UpdateDetails" }
				);
				
		
		routesTable.MapRoute(
					"ComputerTargetGroupDetails",
					"ComputerGroup/{id}/Details",
					new { controller = "ComputerTargetGroup", action = "Details" }
				);
				
		
		routesTable.MapRoute(
					"ComputerTargetsInGroup",
					"ComputerGroup/{id}/Computers",
					new { controller = "ComputerTargetGroup", action = "Computers" }
				);
				
		
		routesTable.MapRoute(
					"ComputerDetails",
					"Computer/{id}/Details",
					new { controller = "Computer", action = "Details" }
				);
				
		
		routesTable.MapRoute(
					"UpdateApprove",
					"Updates/Approve",
					new { controller = "Updates", action = "Approve" }
				);
				
		
		routesTable.MapRoute(
					"DownloadStatus",
					"Home/DownloadStatus",
					new { controller = "Home", action = "DownloadStatus" }
				);
				
		
		routesTable.MapRoute(
					"SynchronizationStatus",
					"Home/SynchronizationStatus",
					new { controller = "Home", action = "SynchronizationStatus" }
				);
				
	}
	
		
	
	public static string UpdatesUnapprovedRoute = "UpdatesUnapproved";
	
	public static string UpdatesUnapproved()
	{
		 MvcHandler handler = (MvcHandler)HttpContext.Current.CurrentHandler;
         RouteValueDictionary dict = new RouteValueDictionary();
         return UrlHelper.GenerateUrl("UpdatesUnapproved", null, null, dict, RouteTable.Routes, handler.RequestContext, true);
	}
		
	
	public static string UpdatesUnapprovedGridRoute = "UpdatesUnapprovedGrid";
	
	public static string UpdatesUnapprovedGrid()
	{
		 MvcHandler handler = (MvcHandler)HttpContext.Current.CurrentHandler;
         RouteValueDictionary dict = new RouteValueDictionary();
         return UrlHelper.GenerateUrl("UpdatesUnapprovedGrid", null, null, dict, RouteTable.Routes, handler.RequestContext, true);
	}
		
	
	public static string UpdatesDeclinedRoute = "UpdatesDeclined";
	
	public static string UpdatesDeclined()
	{
		 MvcHandler handler = (MvcHandler)HttpContext.Current.CurrentHandler;
         RouteValueDictionary dict = new RouteValueDictionary();
         return UrlHelper.GenerateUrl("UpdatesDeclined", null, null, dict, RouteTable.Routes, handler.RequestContext, true);
	}
		
	
	public static string UpdateDetailsRoute = "UpdateDetails";
	
	public static string UpdateDetails()
	{
		 MvcHandler handler = (MvcHandler)HttpContext.Current.CurrentHandler;
         RouteValueDictionary dict = new RouteValueDictionary();
         return UrlHelper.GenerateUrl("UpdateDetails", null, null, dict, RouteTable.Routes, handler.RequestContext, true);
	}
		
	
	public static string ComputerTargetGroupDetailsRoute = "ComputerTargetGroupDetails";
	
	public static string ComputerTargetGroupDetails(System.Guid id)
	{
		 MvcHandler handler = (MvcHandler)HttpContext.Current.CurrentHandler;
         RouteValueDictionary dict = new RouteValueDictionary();
         dict.Add("id", id); 
         return UrlHelper.GenerateUrl("ComputerTargetGroupDetails", null, null, dict, RouteTable.Routes, handler.RequestContext, true);
	}
		
	
	public static string ComputerTargetsInGroupRoute = "ComputerTargetsInGroup";
	
	public static string ComputerTargetsInGroup(System.Guid id)
	{
		 MvcHandler handler = (MvcHandler)HttpContext.Current.CurrentHandler;
         RouteValueDictionary dict = new RouteValueDictionary();
         dict.Add("id", id); 
         return UrlHelper.GenerateUrl("ComputerTargetsInGroup", null, null, dict, RouteTable.Routes, handler.RequestContext, true);
	}
		
	
	public static string ComputerDetailsRoute = "ComputerDetails";
	
	public static string ComputerDetails(String id)
	{
		 MvcHandler handler = (MvcHandler)HttpContext.Current.CurrentHandler;
         RouteValueDictionary dict = new RouteValueDictionary();
         dict.Add("id", id); 
         return UrlHelper.GenerateUrl("ComputerDetails", null, null, dict, RouteTable.Routes, handler.RequestContext, true);
	}
		
	
	public static string UpdateApproveRoute = "UpdateApprove";
	
	public static string UpdateApprove()
	{
		 MvcHandler handler = (MvcHandler)HttpContext.Current.CurrentHandler;
         RouteValueDictionary dict = new RouteValueDictionary();
         return UrlHelper.GenerateUrl("UpdateApprove", null, null, dict, RouteTable.Routes, handler.RequestContext, true);
	}
		
	
	public static string DownloadStatusRoute = "DownloadStatus";
	
	public static string DownloadStatus()
	{
		 MvcHandler handler = (MvcHandler)HttpContext.Current.CurrentHandler;
         RouteValueDictionary dict = new RouteValueDictionary();
         return UrlHelper.GenerateUrl("DownloadStatus", null, null, dict, RouteTable.Routes, handler.RequestContext, true);
	}
		
	
	public static string SynchronizationStatusRoute = "SynchronizationStatus";
	
	public static string SynchronizationStatus()
	{
		 MvcHandler handler = (MvcHandler)HttpContext.Current.CurrentHandler;
         RouteValueDictionary dict = new RouteValueDictionary();
         return UrlHelper.GenerateUrl("SynchronizationStatus", null, null, dict, RouteTable.Routes, handler.RequestContext, true);
	}
	
}
